home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / .realsoft3d.js next >
Encoding:
Text File  |  2005-04-04  |  1.2 KB  |  40 lines

  1. // JavaScript startup script for Realsoft 3D
  2.  
  3. include("oops/r3window.js");
  4. include("oops/r3packer.js");
  5. include("oops/r3button.js");
  6. include("real/r3layer/r3laylis.js");
  7. include("real/widget/r3mainw.js");
  8. include("real/widget/r3mantab.js");
  9.  
  10.  
  11. // find tool bar
  12. tabbed = _r3window.FINDBYNAMEANYWHERE("TabbedToolBar");
  13.  
  14. // add new tab to the tool bar
  15. if(tabbed) {
  16.     tab = tabbed.ADDTAB("My Tools");
  17.  
  18.     packer = new r3Packer(R3PA_Orientation, R3PAOF_VERTICAL);
  19.     
  20.     if(packer) {
  21.         tab.SetGmanager(packer);
  22.  
  23.         button = new r3Button(R3WGA_Parent, tab, R3GA_Text, "My test tool");
  24.         if(button)
  25.             packer.ADD(R3PAPF_FILLX | R3PAPF_FILLY | R3PAPF_EXPAND, 0, button);
  26.     }
  27. }
  28.  
  29.  
  30. // add new menu to the main window
  31. _r3window.ADDCUSTOMMENU(R3MWIA_MenuName, "My Menus",
  32.                            R3MWIA_MenuPrevName, "Edit");
  33.  
  34. // add menu item
  35. _r3window.ADDCUSTOMMENUITEM(R3MWIA_MenuName, "My Menus",
  36.                                R3MWIA_MenuItemName, "Open Attribute window",
  37.                                R3MWIA_MenuType, R3MWCUSTOMMENUTYPE_WINDOW,
  38.                                R3MWIA_MenuData, "Windows/Attributes");
  39.  
  40.